home *** CD-ROM | disk | FTP | other *** search
- Path: stern.fokus.gmd.de!news
- From: Watson <sayegh@fokus.gmd.de>
- Newsgroups: comp.lang.c++
- Subject: Re: C vs Pascal
- Date: Tue, 23 Jan 1996 12:40:25 +0100
- Organization: GMD FOKUS - Research Institute for Open Communication Systems
- Message-ID: <3104C929.56A0@fokus.gmd.de>
- References: <8B87053.0054014A15.uuout@swcbbs.com> <8B8F52F.0054014CDF.uuout@swcbbs.com> <4e0huu$rhn@classic.iinet.com.au>
- NNTP-Posting-Host: pollux.fokus.gmd.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b4 (X11; I; SunOS 5.4 sun4m)
-
- John A Ng wrote:
- > 1. C is portable. Many people think C is portable in that it can be
- > taken from one platform and compile in another. That is incorrect since
- > very very few programs written in C are fully portable except the
- > absurdly small. C is portable only in the sense that one learning in
- > say a MSDOS environment can easily move to another (like UNIX) without
- > too much difficulty. If you know Turbo Pascal, DOS/Windows is your
- > only environment.
- C is of course more portable than P, for there is an ANSI standard.
- The non portability is caused by the existence of different
- standards (Posix, X/Open or whatever). Turbo Pascal is NO
- agreed standard. And, in fact, it's easier to depend on
- ANSI than on Borland ;-)
-
- > 3. Pascal is for the learner and hobbist. True but professionals too.
- > Standard Pascal can do almost nothing -- which is the reason why pompous
- > C programmers sneer at Pascal at being too academic. Yes, but not for
- > Turbo Pascal -- which is vaguely like the original. It is attractive
- > for the learner because Turbo Pascal is lightning fast. Many
- > professional programs are developed in Turbo Pascal!!!
- But none of them can be run under Unix/Linux/OS2/VMS. So your programs
- will only work with DOS/Windows on an Intel-based PC. That's a big
- disadvantage.
-
- > 2. C is more efficient. Bullshit. C/C++ with all its standards is
- > absurdly inefficient in terms of development time. C headers compiles
- > and compiles again for no apparent reason. You must employ tricks to
- > prevent the recompile. There are so many inefficiencies that I just
- > don't want to comment. Turbo Pascal, on the other hand, is the most
- > efficient compiler on earth. It makes any C compiler cry!!! -- A
- > staggering 20 to 1 ratio!!! This is because there are no standards for
- > Turbo Pascal and Borland is free to optimize the languge and features as
- > it sees fit.
- Efficiency should not be measured by compiling time. If
- you are a professional and the compiler is too slow, buy
- a faster machine. But C has some possibilities that Pascal
- hasn't, i.e. pointer to functions and variable parameter
- lists. Of course you could invent these things for Pascal
- too. But not portable.
-
- > 5. C and Pascal are similar. True, Turbo Pascal could properly be
- > called a dialect of C. However, the latest reincarnation of Turbo
- > Pascal (called Delphi) includes many Smalltalk concepts
- So why don't you use the superset? Either C++ or Smalltalk?
-
- C is designed as a portable macro assembler with intergrated
- elements of higher PLs. A programmer could use it for OS
- design as well as for user interfaces or whatever. Pascal could
- be like this as well, but it did not become a standard.
- To avoid the permanent repetition of work, a professional
- programmer needs standards. Remember former times: with
- every new OS you needed to redesign _all_ your software.
- Today you need to redesign only parts (this is bad as well,
- but it becomes less).
- --
- * Greetinx from Watson (sayegh@fokus.gmd.de)
- http://www.fokus.gmd.de/ovma/employees/sayegh/entry.html
- signal(SIGSEGV,SIG_IGN);
-